package cn.tedu.controller;

import cn.tedu.pojo.Car;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("car")
public class CarController {
    @RequestMapping("find")
    public Car find(){
        Car c = new Car();
        c.setId(718);
        c.setName("保时捷");
        c.setType("Cayman T");
        c.setColor("红色");
        c.setPrice(641000);
        return c;
    }
    //接收请求，并返回数据
    @RequestMapping("save")
    public String save(){
        return "abc";
    }

    @RequestMapping("get")//规定了url的写法
    public void get(){
        System.out.println(123);
    }
}
